package com.daiyang.lotterysystem.service.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum UserIdentityEnum {
   ADMIN("ADMIN"),
    NORMAL("NORMAL");

   private final String message;

  public static UserIdentityEnum forName (String name) {
       for (UserIdentityEnum userIdentityEnum : UserIdentityEnum.values()) {
           if(userIdentityEnum.getMessage().equals(name)) {
               return userIdentityEnum;
           }
       }
       return null;
   }
}
